from flask import Blueprint, request
from flask_restful import Api, Resource
from flask_restful.reqparse import RequestParser

from webapp.config import api_utils
from webapp.config.api_utils import oper_log, check_auth
from webapp.models import Grade, VTeacher, Room
from webapp.service.board_service import BoardService
from webapp.tools import download_bord_excel

wx_course_board_app = Blueprint('wxboard', __name__, url_prefix='/wxapi/board')
wx_course_board_api = Api(wx_course_board_app)


parser = RequestParser()
parser.add_argument('weeknum', location='json', type=int, trim=True, required=False)
parser.add_argument('deptId', location='json', type=int, trim=True, required=False)

@wx_course_board_api.resource("", "/")
class WxBoardGradeApi(Resource):
    def post(self):
       data = request.get_json()
       return BoardService.select_course_schedule(data)


